<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  </head>
  
  <body>
  	<input type="hidden" id="usertype" name="usertype" value="${usertype}"/>
    <div class="accordion-group widget-box">
      <div class="accordion-heading">
        <div class="widget-title"> 
        	<a data-parent="#collapse-group" href="#collapseGOne" data-toggle="collapse" class="collapsed">
         	<span class="icon"><i class="icon-search"></i></span>
          	<h5>检索条件</h5>
          	</a> 
        </div>
      </div>
      <div class="accordion-body in collapse" id="collapseGOne" style="height: auto;">
        <div class="form-horizontal">
        	<div class="control-group">
              <div class="search-controls">
              		<label class="control-label2">问卷名称</label>
              		<input type="text" placeholder="Survey Name" class="span2" id="survey_name" >
              		<label class="control-label2">单位名称</label>
              		<input type="text" placeholder="Company Name" class="span2" id="company_name" >
              		<label class="control-label2">答卷人</label>
              		<input type="text" class="span1" id="user_nm" >
              		<label class="control-label2">评估对象</label>
              		<input type="text" class="span1" id="assess_user_nm" >
              		<div class="button-search-right">
              			<input type="button" class="btn btn-success" value="检  索" id="searchButton" onclick="searchResult();">
              		</div>
              </div>
            </div>
        </div>
      </div>
    </div>
    <hr />
    <table id="tabGrid"></table>
    <div id="pager"></div>
  
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery/jqGridUtil.js"></script>
    <script type="text/javascript">
	    jQuery(function(){
	    	var config = {
	           	url:'<%=request.getContextPath() %>/answer/user/answerList.html?doType=query',
	           	colModel:[
	           		{label:'send_survey_user_assuser',name:"send_survey_user_assuser",index:'send_survey_user_assuser', key:true ,hidden:true},
	           		{label:'问卷名称',name:"survey_name",index:'survey_name'},
	           		{label:'RELATION',name:"relation",index:'relation',align:'center',hidden:true},
	           		{label:'答卷人',name:"user_nm",index:'user_nm',width:'50px'},
	           		{label:'评估类别',name:"relation_name",index:'relation_name',align:'center',width:'40px'},
	           		{label:'评估对象',name:"assess_user_nm",index:'assess_user_nm',width:'50px'},
	           		{label:'单位名称',name:"company_name",index:'company_name'},
	           		{label:'问卷发放时间',name:"send_start_dt",index:'send_start_dt',width:'100px'},
	           		{label:'答卷状态',name:"submit_name",index:'submit_name',align:'center',width:'80px'},
	           		{label:'提交/保存时间',name:"submit_dt",index:'submit_dt',align:'left',width:'150px'},
	           		{label:'send_end_dt',name:"send_end_dt",index:'send_end_dt',hidden:true},
	           		{label:'survey_flg',name:"survey_flg",index:'survey_flg',hidden:true}
	           	],
	           	table:"#tabGrid",
	           	pager: "#pager",
	           	multiselect:false,
	            caption:"问卷信息列表"
	      };
	    	jQuery.loadGrid(config);
	    	
	    });
			
	    /**
		    * 检索
		    * @param tabId
		    * @param jsonMap
		    */
	    function searchResult() {
	    	var map = {};
	    	map["survey_name"] = jQuery('#survey_name').val();
	    	map["company_name"] = jQuery('#company_name').val();
	    	map["user_nm"] = jQuery('#user_nm').val();
	    	map["assess_user_nm"] = jQuery('#assess_user_nm').val();
	    	search('tabGrid',map);
	    }

    </script>
  </body>
</html>
